package com.fastjrun.eladmin.itrms.mapstruct;

import com.fastjrun.eladmin.itrms.dto.ServerDTO;
import com.fastjrun.eladmin.itrms.entity.RmsServer;
import com.fastjrun.eladmin.itrms.vo.ServerVO;
import org.mapstruct.DecoratedWith;
import org.mapstruct.InjectionStrategy;
import org.mapstruct.Mapper;
import org.mapstruct.factory.Mappers;

import java.util.List;

@Mapper(componentModel = "spring", injectionStrategy = InjectionStrategy.CONSTRUCTOR)
@DecoratedWith(RmsServerMapperDecorator.class)
public interface RmsServerMapper {

    RmsServerMapper INSTANCE = Mappers.getMapper(RmsServerMapper.class);

    ServerVO toVO(RmsServer entity);

    List <ServerVO> toVO(List<RmsServer> entityList);

    RmsServer toEntity(ServerDTO dto);

}
